import { createApp } from 'vue'
import App from './App.vue'
import router from './index'
import ElementPlus from 'element-plus'
import locale from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import * as ElIconModules from '@element-plus/icons-vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)
app.use(ElementPlus,{locale})//一定在app.use(ElementPlus)前面才起效

for(let iconName in ElIconModules){
  app.component(iconName,ElIconModules[iconName])
}

app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


app.use(router)
app.mount('#app')